home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / wasm223.zip / TODDY.DOC < prev    next >
Text File  |  1993-05-04  |  59KB  |  1,222 lines

  1.  
  2.  
  3.  
  4.                                       Toddy
  5.                             A DOS Command Line Editor
  6.  
  7.                                        by
  8.  
  9.                                    Eric Tauck
  10.                                1304 Deerpass Road
  11.                                 Marengo, IL 60152
  12.                                       U.S.A
  13.  
  14.                              Compuserve: 72457,1557
  15.                        Internet: 72457.1557@compuserve.com
  16.  
  17.         Toddy is a terminate and stay resident (TSR) utility that eases
  18.         the entry and editing of DOS commands, saves commands for later
  19.         retrieval, and provides resident macros that work like simple
  20.         batch files.  Only certain programs that use DOS for input, like
  21.         COMMAND.COM or DEBUG.COM, will be affected by Toddy.  Toddy will
  22.         work on any PC compatible running DOS 2.0 or greater.
  23.  
  24.         Toddy may be used and distributed freely.  The most recent ver-
  25.         sion of the Toddy is available on 5.25" or 3.5" disk by sending
  26.         $10 to the address above.  The WASM compatible source code is
  27.         available for $50.  The source code is for personal use and may
  28.         not be distributed.
  29.  
  30.                              DISCLAIMER OF WARRANTY
  31.  
  32.         THIS SOFTWARE AND MANUAL ARE DISTRIBUTED "AS IS" AND WITHOUT
  33.         WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
  34.         WARRANTIES WHETHER EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS
  35.         HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
  36.         PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
  37.  
  38.         GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
  39.         THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
  40.         THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY
  41.         LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
  42.         REPLACEMENT OR REFUND OF PURCHASE PRICE.
  43.  
  44.                                   Installation
  45.                                   ------------
  46.  
  47.         Toddy is installed by running it from the command line.  The
  48.         features of Toddy are available upon installation.  Toddy is
  49.         usually installed from the AUTOEXEC.BAT file when the computer is
  50.         booted up.  If you get the message "Multiplex number in use by
  51.         another program" when you try to install Toddy, see the /M switch
  52.         described in the Switch Descriptions section.
  53.  
  54.         Toddy uses a minimum of 3696 bytes of memory, and 4512 bytes in
  55.         its default configuration.  The memory consumption increases
  56.         according to the size of the command history (/HS) and macro data
  57.         areas (/MS and /MN).  If you don't use the command history, you
  58.         can conserve memory by setting the history size to zero (/HS0).
  59.  
  60.  
  61.  
  62.         If you don't use macros, you can conserve memory by setting the
  63.         macro table size, macro nest to zero, and the buffer size to 255
  64.         (/MS0, /MN0, and /B255 respectively).  The total bytes used by
  65.         the /HS and /MS must be less than about 51000.
  66.  
  67.         The appearance of Toddy (i.e. the colors and cursor types) can be
  68.         set with the /AC, /AE, /AT, /TC, /TE, /TI, /TO, /TS, and /TX
  69.         switches.  By default, Toddy sets all the colors to white on
  70.         black and does not modify the cursor type.
  71.  
  72.         Once installed, Toddy may be disabled with the /D switch and
  73.         enabled with the /E switch.  These switches might be useful if an
  74.         application conflicts with Toddy.  Toddy may also be removed from
  75.         memory with the uninstall switch (/U).
  76.  
  77.         The end of this document contains a list of version changes and
  78.         some additional notes on using and configuring Toddy.
  79.  
  80.                                      Editing
  81.                                      -------
  82.  
  83.         Toddy's enhanced editing commands are available immediately upon
  84.         installation.  When entering a DOS command, use the right and
  85.         left arrow keys to move the cursor non-destructively.  Past
  86.         commands can be retrieved by pressing the up and down arrow keys,
  87.         or by typing a few letters and searching for a matching command
  88.         with the Tab key.  You can quickly enter the name of an existing
  89.         file by typing part of the name and pressing F9 until the entire
  90.         name is displayed.  The standard DOS editing keys may also be
  91.         used.
  92.  
  93.         In the next table and throughout the rest of this document, a
  94.         "Ctrl-" to the immediate left of a keystroke or letter refers to
  95.         that keystroke being pressed while the CONTROL key is held down.
  96.         Similarly, an "Alt-" next to a keystroke refers to the keystroke
  97.         being pressed while the ALT key is held down.  A complete list of
  98.         editing commands follows:
  99.  
  100.           Left              move cursor left
  101.           Right             move cursor right
  102.           Home              move cursor to first column
  103.           End               move cursor to last column
  104.           Ctrl-Left         move cursor to previous word
  105.           Ctrl-Right        move cursor to next word
  106.  
  107.           Delete            delete character under the cursor
  108.           Backspace         delete character to the left of the cursor
  109.           Ctrl-Backspace    delete word to the left of the cursor
  110.           Ctrl-Home         delete all characters left of the cursor
  111.           Ctrl-End          delete all characters right of the cursor
  112.           Escape            delete all characters on the line
  113.  
  114.           Up                load older history line
  115.           PgUp              load oldest history line
  116.           Down              load newer history line
  117.  
  118.  
  119.  
  120.           PgDn              load newest history line (last line saved)
  121.           Tab               search for matching history line
  122.           Alt-F7            delete all history lines
  123.  
  124.           F9                replace field with matching file name
  125.           F10               replace/append field with matching file name
  126.  
  127.           Enter             accept input
  128.           Ctrl-Enter        accept input without any processing
  129.  
  130.           Insert            toggle insert mode
  131.  
  132.           Ctrl-L            delete word to the left of the cursor
  133.           Ctrl-R            delete word to the right of the cursor
  134.           Ctrl-D            delete current history line
  135.           Ctrl-K            copy current line to history then clear line
  136.           Ctrl-V            enter a control character
  137.  
  138.           F1                copy next character from the template
  139.           F2                copy template characters up to the next key
  140.           F3                copy remaining characters from the template
  141.           F4                skip template characters up to the next key
  142.           F5                copy current input to the template
  143.           F6                insert EOF character
  144.  
  145.         To enter control characters normally interpreted by DOS or Toddy,
  146.         press Ctrl-V and then the letter.  For instance, press Ctrl-VC to
  147.         enter Ctrl-C.  Toddy displays control characters using the actual
  148.         ASCII symbol, for instance a ^C (which is ASCII code 3) shows up
  149.         as a little heart.  Besides the control keys listed above (Ctrl-
  150.         L, Ctrl-R, Ctrl-D, Ctrl-K, and Ctrl-V), some other codes that can
  151.         only be entered using Ctrl-V include: Ctrl-C (break), Ctrl-M
  152.         (enter), Ctrl-P (toggle line printer echo) and Ctrl-S (pause
  153.         display).  Note that Toddy does not allow the NUL code (Ctrl-@)
  154.         to be entered.
  155.  
  156.                               File Name Completion
  157.                               --------------------
  158.  
  159.         The file name completion feature lets you quickly enter the name
  160.         of an existing file.  Just type the first few letters of the file
  161.         name and press F9.  The first file matching those letters will
  162.         replace the letters.  Pressing F9 again will replace the first
  163.         matching file with the next matching file.  If there are no more
  164.         matching files, pressing F9 does nothing.  F10 works similarly to
  165.         F9, except matching files are appended to previous matches
  166.         (rather than replacing previous matches).
  167.  
  168.  
  169.  
  170.         The initial search pattern may include wildcard characters and
  171.         may or may not include a file name extension.  The /FT switch
  172.         determines the files types matched (i.e. normal, hidden, system,
  173.         and/or directories), and the /FU and /FL switches control whether
  174.         matching files are displayed in upper or lowercase letters.  By
  175.         default, only normal files are matched and matching files are
  176.         displayed in uppercase.
  177.  
  178.                                  Command History
  179.                                  ---------------
  180.  
  181.         Every time you execute a DOS command, the command is copied to
  182.         the command history for later retrieval.  If there isn't enough
  183.         room because of previously saved commands, Toddy will delete the
  184.         oldest command or commands to make room.  You can prevent a
  185.         command from being saved to the command history by pressing
  186.         Ctrl-Enter (instead of Enter) to run the command.  You can copy a
  187.         command to the command history without running it by pressing F5
  188.         or Ctrl-K.  The up arrow key will retrieve the last command.
  189.         Repeatedly pressing the up arrow key will retrieve progressively
  190.         older commands.  The down arrow key retrieves newer commands (the
  191.         opposite of the up arrow key).  Other keys for scrolling through
  192.         the command history are listed in the Editing section above.
  193.         Commands are not saved to the command history if they are identi-
  194.         cal to the last command.  Also, Toddy can be configured to pre-
  195.         vent other types of commands from being saved.  See the descrip-
  196.         tions of the /HM, /HU, and /HA switches in the Switch Descrip-
  197.         tions section.  The command history may be written to a file or
  198.         loaded from a file with the /HW and /HR switches.  The current
  199.         history can be locked, freed (unlocked), or cleared with the /HL,
  200.         /HF, and /HC switches.  When the history is locked, commands are
  201.         no longer copied to it.
  202.  
  203.         The command history can be searched by matching the beginning
  204.         characters.  For instance, if you recently entered a long command
  205.         like:
  206.  
  207.           tcc -v -ms zorro init.obj graflib.lib extra.lib
  208.  
  209.         you can search for this line by typing the first few characters,
  210.         "tcc" for instance, and then pressing the Tab key.  If there is
  211.         more than one saved command that begins with "tcc", repeatedly
  212.         pressing Tab will find each occurrence.  If there are no more
  213.         occurrences, the display will not change.
  214.  
  215.         When using the up or down arrow keys to scroll through the com-
  216.         mand history, Toddy will "wrap" from the oldest entry to the
  217.         newest, or from the newest to the oldest.  Toddy loads a blank
  218.         line just before wrapping.  If the history trace is enabled (the
  219.         default state) and you press the down arrow key before anything
  220.         else, Toddy will load the command from the history that follows
  221.         the last command selected from the history.  See the description
  222.         of the /HT switch for more information.
  223.  
  224.  
  225.  
  226.                              Command History Window
  227.                              ----------------------
  228.  
  229.         If you run Toddy without any command line arguments and Toddy has
  230.         already been installed,  Toddy will display a window in the
  231.         center of the screen showing all the commands currently saved in
  232.         the command history.  The Up and Down arrow keys scroll through
  233.         the list one line at a time, the Page-Up and Page-Down keys
  234.         scroll through the list a page at a time, and the Home and End
  235.         keys go to the first (oldest) and last (newest) commands.
  236.  
  237.         When you've found a command you want run or edit, position the
  238.         command to the highlighted center of the window and press the
  239.         Enter key.  The window will close and the command will be pre-
  240.         loaded to the input line.
  241.  
  242.         The colors of the command window can be set with the /AB, /AH,
  243.         and /AX switches.  Though Toddy automatically selects a size for
  244.         the window based on the current text mode, you can explicitly
  245.         select a size with the /SR and /SC switches.
  246.  
  247.         Unlike other aspects of Toddy, the history window manipulates the
  248.         hardware directly and may not work on non-standard video systems.
  249.  
  250.                                 Chained Commands
  251.                                 ----------------
  252.  
  253.         The chain character allows you to enter multiple commands on a
  254.         single line.  The default chain character is Ctrl-T, but may be
  255.         changed with the /CC switch.  If the chain character was defined
  256.         to be the caret (^), the command "arce files1^arce files2" will
  257.         run the two consecutive commands "arce files1" and "arce files2".
  258.         Any number of chained commands may be entered on a single line.
  259.         Macros (described later) can also contain chained commands.
  260.         Inside of macros and in the run command (/R), you can use $t to
  261.         chain commands together.
  262.  
  263.         Press Ctrl-Break to cancel a sequence of executing chained com-
  264.         mands.  Pressing Ctrl-Break may interrupt a sequence of chained
  265.         commands even if you are inside an application.
  266.  
  267.                                      Macros
  268.                                      ------
  269.  
  270.         A macro is a user defined command that's automatically replaced
  271.         by a single command or multiple commands chained together.
  272.         Macros behave very much like small batch files.  Some advantages
  273.         of macros over batch files are that macros are executed faster
  274.         (because they're stored in memory, not on disk), macros generally
  275.         use less disk space (because multiple macros can be stored in a
  276.         single file), macros can be defined or redefined on the fly, and
  277.         macros can have any name (for example you could have a macro
  278.         called DIR, but not a batch file).  Some possible uses for macros
  279.         are renaming commands (like defining D to execute a DIR) and
  280.         applying default arguments to commands (for instance automatical-
  281.  
  282.  
  283.  
  284.         ly applying the /W switch to all DIR commands).  Macros will NOT
  285.         work in batch files.  Macros are defined with the /MD and /ME
  286.         switches and cleared with the /MU, /MF, and /MC switches.  Macros
  287.         can also be defined using the syntax:
  288.  
  289.           TODDY macro=text
  290.  
  291.         where "macro" is the name of the macro and all characters after
  292.         the equal sign are what the macro does.  This second syntax for
  293.         defining macros is equivalent to the /ME switch.  Similarly, a
  294.         macro can be undefined with the syntax:
  295.  
  296.           TODDY macro=
  297.  
  298.         You can also load and save macros to files with the /MR and /MW
  299.         switches.  Use the /ML switch to list the currently defined
  300.         macros.  Some simple macros might be:
  301.  
  302.           TODDY d=dir
  303.           TODDY dir=dir /w
  304.           TODDY /md'clear'del *.obj $t del *.lst $t del *.map'
  305.  
  306.         The first example above makes D act like a DIR command.  The next
  307.         example automatically applies the /W switch to all DIR commands.
  308.         The last example creates a CLEAR command to delete all OBJ, LST,
  309.         and MAP files from the current directory.  The first two examples
  310.         use one format for defining macros and the third example uses the
  311.         other format.  The third example uses the special character
  312.         sequence "$t" to chain multiple commands together.
  313.  
  314.         Macros can access command line arguments in the same way as batch
  315.         files.  The first 99 arguments are retrieved using the parameters
  316.         $1 to $99.  The special parameter $* returns all arguments start-
  317.         ing after the largest previously retrieved argument.  For in-
  318.         stance, if you referred to $11 in your macro, a $* will return
  319.         all arguments starting with $12.  Also, you can return all argu-
  320.         ments starting with a particular argument number using the syntax
  321.         $n*, where "n" is the starting argument number.  For instance,
  322.         $7* will return all arguments starting with the seventh.  The
  323.         character indicating a parameter, a dollar sign by default, can
  324.         be changed with the /CP switch; and the character for multiple
  325.         arguments, a asterisk by default, can be changed with the /CM
  326.         switch.
  327.  
  328.         A more useful definition of the DIR macro above would use a
  329.         parameter as follows:
  330.  
  331.           TODDY dir=dir $1 /w
  332.  
  333.         With this macro definition, a DIR without arguments would expand
  334.         to "DIR /W", and a "DIR *.COM" would expand to "DIR *.COM /W".
  335.         Another example:
  336.  
  337.           TODDY tcc=tcc -v $* userlib.lib
  338.  
  339.  
  340.  
  341.         This macro replaces TCC with one that automatically specifies
  342.         multiple command line arguments.  If you ran "tcc -O zipper",
  343.         you'd actually be running "tcc -v -O zipper userlib.lib".
  344.  
  345.         There are other special parameters in addition to the $t used
  346.         above:
  347.  
  348.           $$  replaced with parameter character ($)
  349.           $b  replaced with bar (|)
  350.           $l  replaced with less-than (<)
  351.           $g  replaced with greater-than (>)
  352.           $q  replaced with removable quote (see Quotes section)
  353.           $s  parameter sink
  354.  
  355.         The first five parameters above are simply replaced by the speci-
  356.         fied character.  These parameters are necessary if you are creat-
  357.         ing a macro at the DOS prompt or in a batch file because Toddy
  358.         normally uses and absorbs the parameter and quote character, and
  359.         DOS normally uses and absorbs the bar, greater, and less-than
  360.         characters.  The parameter sink works like the $* parameter
  361.         except an empty string is returned.  The parameter sink is some-
  362.         times necessary because Toddy automatically appends unreferenced
  363.         trailing arguments, as if there was $* automatically appended all
  364.         macros.  To suppress any trailing arguments, you must use the
  365.         parameter sink.  See the two DIR macros below for an example of
  366.         using the $s parameter.  All of the special parameters using a
  367.         letter can use an upper or lowercase letter.
  368.  
  369.         Macros may be defined multiple times.  The most recent definition
  370.         always takes precedence.  A macro may also call another macro.
  371.         If a macro calls a macro of the same name, the most recent defi-
  372.         nition (prior to the calling macro) will be called.  For in-
  373.         stance, if the following macros were defined:
  374.  
  375.           TODDY dir=dir $* /w
  376.           TODDY dir=cls $s $t dir $*
  377.  
  378.         a DIR command will call the second macro (because it's the most
  379.         recent definition).  This macro clears the screen (with CLS) and
  380.         calls DIR.  Since DIR has an earlier definition (the first
  381.         macro), it's also called as a macro.  The net effect of running a
  382.         DIR command after defining the two macros above is to clear the
  383.         screen and perform a DOS DIR command with the /W switch.  The
  384.         parameter sink ($s) is necessary in the second macro to prevent
  385.         any arguments from being appended to the CLS command.
  386.  
  387.         If a command is preceded by the "literal character", it is not
  388.         interpreted as a macro.  The literal character is undefined by
  389.         default, but can be defined with the /CL switch.  If the literal
  390.         character was defined to be an exclamation mark, running "!DIR"
  391.         will execute the standard DOS directory command regardless of any
  392.         previous DIR macro definitions.
  393.  
  394.         Toddy beeps, cancels all running macros, and returns an empty
  395.         input line if: 1. the macros are nested too deeply, 2. the macro
  396.  
  397.  
  398.  
  399.         expansion is too long, or 3. the quote parameter ($q) or chain
  400.         parameter ($t) are used and no quote or chain character is de-
  401.         fined.  The macro expansion may be too long internally (see the
  402.         /B switch) or too long for the command line (127 bytes for COM-
  403.         MAND.COM, and 255 bytes for 4DOS and NDOS).  A potential macro
  404.         nest problem is circular macro references.  For instance:
  405.  
  406.           TODDY a=b
  407.           TODDY b=a
  408.  
  409.         You will always get an error if you try to run one of these two
  410.         macros because these macros continuously call each other until
  411.         the macro nest level is exceeded.
  412.  
  413.                                      Quotes
  414.                                      ------
  415.  
  416.         Macro arguments are defined as sequences of characters separated
  417.         by spaces, so there's no way retrieve an argument that contains
  418.         spaces unless you use quotes.  All characters inside and includ-
  419.         ing double quotes (") are treated as a single argument.  For
  420.         instance, if you defined the following macro:
  421.  
  422.            TODDY g=grep $1 *.*
  423.  
  424.         the following command will work properly because quotes are used:
  425.  
  426.            g "a blank"
  427.  
  428.         Toddy recognizes two kinds of quotes, text and removable.  Text
  429.         quotes work as described above and removable quotes work similar-
  430.         ly but are removed when the line is evaluated.  The default
  431.         removable quote is the back quote character (`).  If you defined
  432.         the following macro:
  433.  
  434.           TODDY e=echo ($1)
  435.  
  436.         running:
  437.  
  438.           e `a b c d`
  439.  
  440.         will display:
  441.  
  442.           (a b c d)
  443.  
  444.         Chain characters are not evaluated inside of quoted arguments,
  445.         but parameters ($1, $2, $t, etc.) are.  If you want to use the
  446.         parameter character inside of a quoted string, use the special
  447.         parameter $$.
  448.  
  449.         The text and removable quote characters can be redefined with the
  450.         /CX and /CQ switches.  You can also define a second text quote
  451.         character with the /CY switch.
  452.  
  453.  
  454.  
  455.                                     Switches
  456.                                     --------
  457.  
  458.         Switches take affect when Toddy is installed or can be passed to
  459.         an already resident Toddy by running Toddy again.  Switches may
  460.         be written to the executable file TODDY.COM with the /W switch.
  461.         When switches are written to the executable file, they automati-
  462.         cally take effect when Toddy is installed.  A list of the Toddy
  463.         command line switches are displayed to the screen by running:
  464.  
  465.           TODDY /?
  466.  
  467.         In the switch descriptions of the following sections, a "d" de-
  468.         notes a decimal digit, an "x" denotes a hexadecimal digit, and an
  469.         "'s'" denotes a string in quotes.  The number of decimal or
  470.         hexadecimal digits only serve as a general reference to the
  471.         magnitude of the number -- in most cases fewer digits are al-
  472.         lowed.
  473.  
  474.                                  Switch Summary
  475.                                  --------------
  476.  
  477.         Installation:
  478.  
  479.           /Bddddd      input buffer size
  480.           /BSddd       restricted input buffer size
  481.           /Mddd        multiplex number
  482.           /Q           quiet mode
  483.           /V           verbose mode
  484.           /E           enable Toddy
  485.           /D           disable Toddy
  486.           /W           write switches
  487.           /U           uninstall Toddy
  488.           /UI          uppercase ignored
  489.           /US          uppercase significant
  490.  
  491.         Attributes (colors):
  492.  
  493.           /ATxx        text attribute
  494.           /ACxx        cursor attribute
  495.           /AExx        end attribute
  496.  
  497.           /ABxx        command window border
  498.           /AHxx        command window highlight
  499.           /AXxx        command window text
  500.  
  501.         Cursor Type:
  502.  
  503.           /TC          use custom cursor
  504.           /TS          use system cursor
  505.           /TExxxx      entry cursor type
  506.           /TIxxxx      insert cursor type
  507.           /TOxxxx      overwrite cursor type
  508.           /TXxxxx      exit cursor type
  509.  
  510.  
  511.  
  512.         Characters:
  513.  
  514.           /CQddd       quote character
  515.           /CXddd       text quote character one
  516.           /CYddd       text quote character two
  517.           /CPddd       parameter character
  518.           /CMddd       multiple argument character
  519.           /CLddd       literal character
  520.           /CCddd       chain character
  521.  
  522.         Insert Mode:
  523.  
  524.           /II          select insert mode
  525.           /IO          select overwrite mode
  526.           /IR          reset insert
  527.           /IP          preserve insert
  528.  
  529.         File Name Completion:
  530.  
  531.           /FL          display names in lowercase letters
  532.           /FU          display names in uppercase letters
  533.           /FTxx        file name completion types
  534.  
  535.         Command Window:
  536.  
  537.           /S           select command (open command window)
  538.           /SCddd       command window columns
  539.           /SRddd       command window rows
  540.  
  541.         History:
  542.  
  543.           /HSddddd     command history size
  544.           /HMddd       minimum command length
  545.           /HU          save unique commands
  546.           /HA          save all commands
  547.           /HL          lock history
  548.           /HF          free history
  549.           /HN          no history trace
  550.           /HT          history trace enabled
  551.           /HRfile      read history from file
  552.           /HWfile      write history to file
  553.           /HC          clear history
  554.  
  555.         Macros:
  556.  
  557.           /MSddddd     macro table size
  558.           /MNddd       maximum macro nest
  559.           /MD's's'     define macro
  560.           /ME's's'     exchange (replace) macro
  561.           /MU's'       undefine macro
  562.           /MF's'       forget macro
  563.           /MC          clear all macros
  564.           /ML          list macros
  565.           /MR          read macros from file
  566.  
  567.  
  568.  
  569.           /MW          write macros to file
  570.  
  571.         Miscellaneous:
  572.  
  573.           /A           display memory allocations
  574.           /R's'        run a command
  575.  
  576.                                Switch Descriptions
  577.                                -------------------
  578.  
  579.         /A        Display memory allocations.  The first three numbers
  580.                   displayed are the memory allocated for the command
  581.                   history, macro table, and file name completion.  The
  582.                   next three numbers are the total heap memory (usually
  583.                   the sum of the first three numbers), the memory used by
  584.                   macro definitions, and the amount of available heap
  585.                   memory.  The next two numbers are the maximum macro
  586.                   nest and input buffer size.  The last number is the
  587.                   total bytes used by these data areas (the sum of the
  588.                   first three numbers, the bytes used by the macro nest,
  589.                   and the size of the input buffer).  All available heap
  590.                   memory can be used for macros.  Whatever memory isn't
  591.                   used by macros is used for the command history (or the
  592.                   file name completion commands if needed).  See the
  593.                   Notes section for more information on memory usage.
  594.  
  595.         /ABxx     Set the attribute of the command history window border.
  596.                   The /AC switch describes attribute bytes.  The default
  597.                   is /AB7.
  598.  
  599.         /ACxx     Set the attribute of the character under the cursor.
  600.                   The first digit of the attribute byte is the background
  601.                   color and the second digit is the foreground color.
  602.                   Color values of 0 to 7 correspond to black, blue, green
  603.                   cyan, red, magenta, brown, and white.  Adding 8 to the
  604.                   lower nibble makes the foreground color brighter.
  605.                   Adding 8 to the upper nibble usually makes the fore-
  606.                   ground blink.  The default is /AC7 (white on black).
  607.  
  608.         /AExx     Set the attribute of the blanks following the text.
  609.                   The /AC switch describes attribute bytes.  The default
  610.                   is /AE7.
  611.  
  612.         /AHxx     Set the attribute of the command history select line
  613.                   (i.e. the "highlight" color).  The /AC switch describes
  614.                   attribute bytes.  The default is /AH70.
  615.  
  616.         /ATxx     Set the attribute of the text.  The /AC switch de-
  617.                   scribes attribute bytes.  The default is /AT7.
  618.  
  619.         /AHxx     Set the attribute of the command history text.  The /AC
  620.                   switch describes attribute bytes.  The default is /AX7.
  621.  
  622.         /Bddddd   Set the input buffer size.  This is the number of bytes
  623.                   reserved for entering commands and expanding macros.
  624.  
  625.  
  626.  
  627.                   If there is an error running a macro, you may have to
  628.                   make this number larger.  The minimum value is 255 and
  629.                   the default is /B512.  If you don't use macros, or only
  630.                   use short macros, you could conserve memory by reducing
  631.                   this number to the minimum.
  632.  
  633.         /BSddd    Set the restricted input buffer size.  If this switch
  634.                   is used, Toddy will only process input when the speci-
  635.                   fied number of characters are requested.  To restrict
  636.                   Toddy to DOS commands, use /BS128 for COMMAND.COM and
  637.                   /BS255 for 4DOS and NDOS.
  638.  
  639.         /CCddd    Define the chain character.  The chain character is
  640.                   used to specify multiple commands on single line or in
  641.                   a macro.  The number is the ASCII value of the charac-
  642.                   ter.  The chain character cannot be a space.  The
  643.                   default is /CC20 (Ctrl-T).  Chain characters are de-
  644.                   scribed in the Chained Commands section.
  645.  
  646.         /CLddd    Define the literal character.  A literal character
  647.                   forces Toddy to pass a command directly to DOS without
  648.                   interpreting it as a macro.  The number is the ASCII
  649.                   value of the character.  The literal character cannot
  650.                   be a space.  The default is /CL0 (no literal character
  651.                   defined).  Literal characters are described in the
  652.                   Macros section.
  653.  
  654.         /CMddd    Define the multiple argument character.  The multiple
  655.                   argument character is used with regular macro parame-
  656.                   ters to refer to all following arguments.  The number
  657.                   is the ASCII value of the character.  The multiple
  658.                   argument character cannot be a space.  The default is
  659.                   /CM42 (an asterisk).  Multiple argument parameters are
  660.                   described in the Macros section.
  661.  
  662.         /CPddd    Define the parameter character.  This is the character
  663.                   used to specify parameters within macros.  The number
  664.                   is the ASCII value of the character.  The parameter
  665.                   character cannot be a space.  The default is /CP36 (a
  666.                   dollar sign).  Macro parameters are described in the
  667.                   Macros section.
  668.  
  669.         /CQddd    Define the removable quote character.  This character
  670.                   is primarily used to delimit macro parameters contain-
  671.                   ing spaces or chain characters.  The number is the
  672.                   ASCII value of the character.  The default is /CP96 (a
  673.                   back quote).  Quotes are described in the Quotes sec-
  674.                   tion.
  675.  
  676.         /CXddd    Define the text quote character.  This character delim-
  677.                   its macro parameters containing spaces or chain charac-
  678.                   ters.  The number is the ASCII value of the character.
  679.                   The default is /CP34 (a double quote).  Quotes are
  680.                   described in the Quotes section.
  681.  
  682.  
  683.  
  684.         /CYddd    Define the alternate text quote character.  This char-
  685.                   acter delimits macro parameters containing spaces or
  686.                   chain characters.  The number is the ASCII value of the
  687.                   character.  The default is /CP0 (undefined).  Quotes
  688.                   are described in the Quotes section.
  689.  
  690.         /D        Disable the resident Toddy.  All command input will be
  691.                   performed by DOS as if Toddy wasn't installed.
  692.  
  693.         /E        Enable the resident Toddy.  This switch undoes the
  694.                   effects of the disable switch, /D.
  695.  
  696.         /FL       Display file names in lowercase letters.  This switch
  697.                   makes file names inserted with the F9 or F10 keys
  698.                   appear in lowercase letters.
  699.  
  700.         /FTxx     Select the file types for file name completion.  This
  701.                   switch allows you to specify what types of files will
  702.                   be matched by the file name completion commands (F9 and
  703.                   F10).  The possible values are: 00 = normal file, 02 =
  704.                   hidden files, 04 = system files, and 10 = directories.
  705.                   Add the hexadecimal values together to combine types.
  706.                   /FT10 (00 + 10) finds all normal files and directories.
  707.                   /FT06 (00 + 02 + 04) finds all normal, hidden, and
  708.                   system files. /FT16 (00 + 02 + 04 + 10) finds all files
  709.                   and directories.  The default is /FT00 (find normal
  710.                   files only).
  711.  
  712.         /FU       Display file names in uppercase letters.  This switch
  713.                   makes file names inserted with the F9 or F10 keys
  714.                   appear in uppercase letters.  This is the default.
  715.  
  716.         /HA       Save all commands to the command history.  This switch
  717.                   undoes the effects of the /HU switch.  This is the
  718.                   default.
  719.  
  720.         /HC       Clear command history.  All saved commands are deleted.
  721.                   If you want to save a sequence of DOS commands as a
  722.                   batch file (with the /HW switch), you could use this
  723.                   switch to first clear any previously saved commands.
  724.                   You can also clear the command history by pressing
  725.                   Alt-F7.
  726.  
  727.         /HF       Free the command history.  Commands will be saved to
  728.                   the command history normally.  This switch undoes the
  729.                   effects of the /HL switch.
  730.  
  731.         /HL       Lock the command history.  This switch prevents further
  732.                   commands from being saved to the command history.
  733.                   Unlock the history with the /HF switch.
  734.  
  735.         /HMddd    Set the minimum command length.  All commands that are
  736.                   shorter than this value are not saved to the command
  737.                   history.  This switch is useful if you don't want to
  738.                   save trivial commands like DIR or CLS.  The default is
  739.  
  740.  
  741.  
  742.                   /HM0 (all commands are saved).
  743.  
  744.         /HN       No history trace.  This switch undoes the effects of
  745.                   the /HT switch.  The down arrow key always loads the
  746.                   next newer command or wraps to the oldest command.
  747.  
  748.         /HRfile   Read the command history from a file.  Each line of the
  749.                   specified file is added to the command history.  If the
  750.                   command history is not large enough, older lines are
  751.                   deleted to make room.  The normal criteria for saving
  752.                   commands (like minimum length) are not used.  The file
  753.                   may be created from scratch or be a previously saved
  754.                   history.  The file must a standard text file.
  755.  
  756.         /HSddddd  Set the command history size.  The command history size
  757.                   is the number of bytes reserved for saving commands.
  758.                   If you don't use the command history, you can conserve
  759.                   memory by setting the size to 0 with /HS0.  The default
  760.                   is /HS256.
  761.  
  762.         /HT       History trace enabled.  When this switch is in effect,
  763.                   if last command was selected from the command history,
  764.                   the down arrow initially loads to the next newer com-
  765.                   mand relative to the last command.  This is useful for
  766.                   reentering multiple commands.  For instance, if you've
  767.                   recently entered the commands:
  768.  
  769.                     COPY *.* A:
  770.                     DEL *.*
  771.  
  772.                   and you want to run these two commands again, first
  773.                   find the COPY command by entering "co" and pressing
  774.                   TAB.  When the COPY command is displayed, run it.  Now
  775.                   you can recall the DEL command just by pressing the
  776.                   Down arrow key.  This is the default.
  777.  
  778.         /HU       Save unique commands only.  Toddy will scan the command
  779.                   history and only save a command if it's different than
  780.                   all the other saved commands.  This switch is useful if
  781.                   you primarily retrieve past commands by searching
  782.                   rather than scrolling up or down the history.  This
  783.                   switch has the opposite effect of the /HA switch.
  784.  
  785.         /HWfile   Write the command history to a file.  All commands
  786.                   stored in the command history are written to the speci-
  787.                   fied file.  The commands are saved as a standard text
  788.                   file.  This switch can be used to run a sequence of DOS
  789.                   commands and then save them as a batch file.
  790.  
  791.         /II       Select insert mode for editing.  This is the default
  792.                   mode.
  793.  
  794.         /IO       Select overwrite mode for editing.
  795.  
  796.         /IP       Preserve the insert/overwrite mode between commands.
  797.  
  798.  
  799.  
  800.                   The insert or overwrite mode is preserved from the last
  801.                   time a command was entered.  This switch has the oppo-
  802.                   site effect of the /IR switch.
  803.  
  804.         /IR       Reset the insert/overwrite mode between commands.  Each
  805.                   time a command is entered, the mode will be set to
  806.                   insert or overwrite (depending on the current mode when
  807.                   this switch is used).  This switch has the opposite
  808.                   effect of the /IP switch.  This is the default.
  809.  
  810.         /Mddd     Set the multiplex number.  If you get the message
  811.                   "Multiplex number in use by another program" when you
  812.                   try to install Toddy, you can change the multiplex
  813.                   number with the /M switch.  The multiplex number should
  814.                   be in the range 192 to 255.  The default is /M215.
  815.  
  816.         /MC       Clear all macro definitions.  This switch can be used
  817.                   to delete all currently defined macros, or to ignore
  818.                   any macros saved to TODDY.COM during installation.
  819.  
  820.         /MD's's'  Define a macro.  This parameter uses two fields, the
  821.                   macro name and the replacement text.  The first charac-
  822.                   ter after the /MD is the definition delimiter.  Though
  823.                   this delimiter is usually a quote (or double quote), it
  824.                   can be any character not used in the macro or replace-
  825.                   ment text.  There are three delimiters: one at the
  826.                   start of the macro name, one separating the macro name
  827.                   from the replacement text, and one at the end of the
  828.                   replacement text.  The macro name can be any sequence
  829.                   of characters, though it shouldn't contain any spaces.
  830.                   The replacement text can contain any sequence of char-
  831.                   acters.  Note: this switch does not remove any previous
  832.                   definitions of the macro.  Use the /ME switch to re-
  833.                   place the most recent definition of a macro.  Macros
  834.                   are described in the Macros section.
  835.  
  836.         /ME's's'  Exchange a macro.  This switch replaces the most recent
  837.                   definition of a macro, which is equivalent to undefin-
  838.                   ing then defining a macro.  The syntax and usage are
  839.                   identical to the /MD switch.
  840.  
  841.         /MF's'    Forget a macro.  This switch clears all definitions of
  842.                   a macro (not just the most recent definition).  The
  843.                   macro name is delimited similarly to the macro defini-
  844.                   tion switch (/MD), except there is no replacement text.
  845.                   Use the /MU switch to clear only the most recent defi-
  846.                   nition.
  847.  
  848.         /ML       List macros.  All currently defined macros will be
  849.                   displayed.
  850.  
  851.         /MNddd    Set maximum macro nest level.  A nest level is used
  852.                   whenever a macro calls another macro.  If the maximum
  853.                   nest level is reached while running a macro, Toddy will
  854.                   beep and abort the macro.  Toddy requires 4 bytes of
  855.  
  856.  
  857.  
  858.                   memory for each nest level.  If you don't use macros,
  859.                   you can conserve memory by setting the nest level to 0
  860.                   with /MN0.  The default is /MN10.
  861.  
  862.         /MRfile   Read macros from a file.  The file must be a standard
  863.                   text file.  The file may be created by the user or by
  864.                   saving macros with the /MW switch.  Each line of the
  865.                   file contains a single macro definition.  The macros
  866.                   must be defined in the form:
  867.  
  868.                     macro=text
  869.  
  870.                   where "macro" is the name of the macro and "text" is
  871.                   the replacement text for the macro.  All characters
  872.                   after the first equals sign become part of the macro
  873.                   text.  Any line beginning with a colon is considered a
  874.                   comment and is ignored.
  875.  
  876.         /MSddddd  Set the macro table size.  The macro table size is the
  877.                   number of bytes reserved for macro definitions.  If you
  878.                   don't use macros, you can conserve memory by setting
  879.                   the table size to 0 with /MS0.  The default is /MS256.
  880.  
  881.         /MU's'    Undefine a macro.  This switch clears the most recent
  882.                   definition of a macro.  The macro name is delimited
  883.                   similarly to the macro definition switch (/MD), except
  884.                   there is no replacement text.  Note that a macro may
  885.                   have multiple definitions and this switch only clears
  886.                   the most recent.  Use the /MF switch to clear all
  887.                   definitions of a macro.
  888.  
  889.         /MWfile   Write macros to a file.  All currently defined macros
  890.                   are written to the specified file.  The file is a
  891.                   standard text file with one macro definition per line.
  892.                   Macros saved with this switch can be loaded with the
  893.                   /MR switch.
  894.  
  895.         /Q        Enable quiet mode.  When Toddy is in quiet mode, the
  896.                   regular confirmation messages are suppressed -- only
  897.                   error messages are displayed.  If you use /Q before all
  898.                   other switches on the command line, Toddy's banner will
  899.                   also be suppressed.
  900.  
  901.         /R's'     Run a command.  The specified command is preloaded to
  902.                   the input buffer, and the next time Toddy gets the
  903.                   chance, the command will be executed.  If this switch
  904.                   is used in batch file, the command will be run as soon
  905.                   as the batch file terminates.  The command is delimited
  906.                   similarly to the macro definition switch (/MD), except
  907.                   there is no replacement text.
  908.  
  909.         /S        Select a previous command.  This switch opens the
  910.                   command history window and lets you select a past
  911.                   command by scrolling through the command history.  Once
  912.                   Toddy has been installed, running Toddy without any
  913.  
  914.  
  915.  
  916.                   command line arguments also performs this function.
  917.                   See the Command History Window section for more infor-
  918.                   mation.
  919.  
  920.         /SCddd    Set the number of columns used by the command history
  921.                   window.  This the number includes the border.  The
  922.                   default is /SC0, which tells Toddy to decide how many
  923.                   columns.
  924.  
  925.         /SRddd    Set the number of rows used by the command history
  926.                   window.  This number includes the border.  The default
  927.                   is /SR0, which tells Toddy to decide how many rows.
  928.  
  929.         /TC       Use the custom cursor type defined with the /TE, /TI,
  930.                   and /TO switches.  The /TE, /TI, and /TO switches
  931.                   automatically set this switch.
  932.  
  933.         /TExxxx   Set the entry cursor type.  This switch sets both the
  934.                   insert and overwrite cursor types.  This switch should
  935.                   be used instead of, but not with, the /TI and /TO
  936.                   switches.  The cursor type is the size and shape of the
  937.                   blinking cursor blob.  The first byte of this two byte
  938.                   value is the top scan line number and the second byte
  939.                   is the bottom scan line number.  The scan lines for CGA
  940.                   are numbered 00 to 07, for EGA adapters it's 00 to 0D,
  941.                   and for VGA adapters it's 00 to 0E.  The default cursor
  942.                   is usually the bottom two scan lines (i.e. 0607 for
  943.                   CGA, 0C0D for EGA, and 0D0E for VGA).  You can make a
  944.                   big blinking blob on most adapters with 000F.  You can
  945.                   turn off the blinking cursor entirely on most adapters
  946.                   with value of 2000.
  947.  
  948.         /TIxxxx   Set the insert cursor type.  This is the cursor type
  949.                   used when in insert mode.  The /TE switch describes how
  950.                   to set the cursor type.
  951.  
  952.         /TOxxxx   Set the overwrite cursor type.  This is the cursor type
  953.                   used when in overwrite mode.  The /TE switch describes
  954.                   how to set the cursor type.
  955.  
  956.         /TS       Use system cursor (i.e. don't make any changes to it).
  957.                   This switch turns off all the custom cursor settings.
  958.                   This is the default.
  959.  
  960.         /TXxxxx   Set exit cursor type.  This is the cursor type to use
  961.                   when Toddy has finished inputting a line.  Generally,
  962.                   this switch is used to restore the cursor after setting
  963.                   it with the other cursor switches.  For this and the
  964.                   other cursor switches, if no cursor is specified, the
  965.                   current system cursor will be used (i.e. this switch
  966.                   usually isn't necessary).
  967.  
  968.  
  969.  
  970.         /U        Uninstall Toddy.  This switch removes Toddy from memo-
  971.                   ry.  It may not be possible to uninstall Toddy if
  972.                   another TSR has been loaded after Toddy.
  973.  
  974.         /UI       Uppercase letters are ignored.  This switch undoes the
  975.                   effects of the /UI switch and is the default state.
  976.  
  977.         /US       Uppercase letters are significant.  If this switch is
  978.                   specified, Toddy will treat uppercase and lowercase
  979.                   letters as being different.  For instance, if you
  980.                   define a macro called "DIR" and ran the command "dir",
  981.                   the macro will NOT be run.  This switch also affects
  982.                   command history operations, like searches and saving
  983.                   unique commands (the /HU switch).  Note that DOS is NOT
  984.                   case-sensitive -- this switch only affects Toddy.
  985.  
  986.         /V        Enable verbose mode.  This switch undoes the effects of
  987.                   the /Q switch.
  988.  
  989.         /W        Write current settings to TODDY.COM.  All switches and
  990.                   macros will be written the executable file TODDY.COM.
  991.                   The settings will be the new defaults the next time
  992.                   Toddy is installed.  A macro definition may be removed
  993.                   from TODDY.COM by undefining the macro and rewriting
  994.                   the settings.  If you are running DOS 2.X, TODDY.COM
  995.                   must be in the current directory when using this
  996.                   switch.
  997.  
  998.                                          Examples
  999.                                          --------
  1000.  
  1001.         TODDY
  1002.  
  1003.           Install Toddy using the default switches.
  1004.  
  1005.         TODDY /hs10000 /ms100 /to000f
  1006.  
  1007.           Install Toddy with a 10000 byte command history, 100 byte macro
  1008.           area, and set the cursor scan lines to a big blinking blob
  1009.           whenever overwrite mode is in effect.
  1010.  
  1011.         TODDY /at1F /ac4F /ae1F /te2000
  1012.  
  1013.           Set the colors to a uniform bright white on blue with a red
  1014.           block cursor.  The blinking cursor is turned off for each
  1015.           input.
  1016.  
  1017.         TODDY /hs1000 /hm6 /w
  1018.  
  1019.           Write the /HS1000 and /HM6 switches to TODDY.COM so they don't
  1020.           need to be specified the next time Toddy is installed.
  1021.  
  1022.         TODDY /md'dir'dir $* /w' /md'del'move $1 c:\trashcan' /cl33
  1023.  
  1024.           Define two macros and set the literal character to an exclama-
  1025.  
  1026.  
  1027.  
  1028.           tion mark.  The first macro appends the /W parameter to all DIR
  1029.           commands.  The second macro makes the DEL command move files to
  1030.           be deleted to a directory called TRASHCAN, where they can be
  1031.           later retrieved if you change your mind about the deletion.
  1032.           With the definition of the literal character, !DEL performs a
  1033.           regular and permanent delete.  The DEL macro requires a MOVE
  1034.           utility, which isn't usually included with DOS, but is avail-
  1035.           able on many BBS's and online services.
  1036.  
  1037.         TODDY /u
  1038.  
  1039.           Remove Toddy from memory.
  1040.  
  1041.  
  1042.                                   Version Changes
  1043.                                   ---------------
  1044.  
  1045.         Version 2.00
  1046.  
  1047.           First public release.
  1048.  
  1049.         Version 2.01
  1050.  
  1051.           Several command line switches renamed.
  1052.  
  1053.         Version 2.10
  1054.  
  1055.           Ctrl-Break implemented and mouse support removed to conserve
  1056.           memory.
  1057.  
  1058.         Version 2.11
  1059.  
  1060.           Search command made case-insensitive.
  1061.  
  1062.         Version 2.20
  1063.  
  1064.           Cursor switches expanded.
  1065.  
  1066.         Version 3.00
  1067.  
  1068.           Complete rewrite.  New features include chained commands and
  1069.           macros.  Other changes include: most command line switches
  1070.           renamed, switches are automatically passed to a resident Toddy
  1071.           (no /RS needed), default values changed, several editing keys
  1072.           changed, delimiters for move word left and right changed, and
  1073.           history search improved.
  1074.  
  1075.         Version 4.00
  1076.  
  1077.           Many new features added: macros and the command history may be
  1078.           saved and loaded from a file, control characters can be en-
  1079.           tered, Ctrl-Break cancels chained commands and macros, DOS
  1080.           editing keys supported, file name completion, and more.  Other
  1081.           changes include: several editing keys changed, alternate syntax
  1082.           for defining macros, switches must start with a slash (/),
  1083.  
  1084.  
  1085.  
  1086.           macro parameter syntax slightly changed.
  1087.  
  1088.         Version 5.00
  1089.  
  1090.           Macro interpreter totally rewritten: previous restrictions with
  1091.           regard to the $* parameter have been removed, parameters above
  1092.           $9 are now $10 to $99, new special parameters introduced ($t,
  1093.           $l, $g, etc), $n* parameter added, trailing arguments automati-
  1094.           cally appended to macro expansion, the asterisk in the $* and
  1095.           $n* parameters can be redefined.  New features added: quoted
  1096.           strings, command history window, comments in macro files,
  1097.           preload a command to the input buffer (/R switch), and the /FL,
  1098.           /FU, /HT, /HN switches.  Other changes include: down arrow key
  1099.           has new function (see /HT and /HN switches), macro definition
  1100.           syntax "macro=text" and "macro=" replace and undefine macro
  1101.           definitions, /Q affects banner without writing to file, new
  1102.           memory configuration option /B, and suppresses system prompt
  1103.           for phantom drives.
  1104.  
  1105.         Version 5.01
  1106.  
  1107.           Fixed a bug associated with the /TE /TI /TO /TX switches.
  1108.  
  1109.         Version 5.10
  1110.  
  1111.           Cursor is moved to the end of the line when loading commands
  1112.           from the command history, the cursor isn't hidden in the selec-
  1113.           tion window, and the allocation switch (/A) displays more
  1114.           information.
  1115.  
  1116.         Version 5.11
  1117.  
  1118.           Fixed "Error in switches ..." message when using /S switch.
  1119.  
  1120.                                       Notes
  1121.                                       -----
  1122.  
  1123.         Toddy performs the same function as the DOSKEY utility provided
  1124.         with DOS version 5.  The two programs are somewhat macro and
  1125.         keystroke compatible, though the command line switches are total-
  1126.         ly different.  By and large, Toddy has a lot more features than
  1127.         DOSKEY but uses a little more memory (in its default configura-
  1128.         tion).
  1129.  
  1130.         Toddy will work with 4DOS (and the version of 4DOS licensed to
  1131.         Symantec/Peter Norton Computing called NDOS), though the /L1
  1132.         parameter must be set using the SETDOS command.  When Toddy is
  1133.         installed under 4DOS, many of 4DOS' features are still available,
  1134.         including aliases and multiple commands on a single line.  Toddy
  1135.         is somewhat redundant when using 4DOS, since most of the features
  1136.         of Toddy are available through 4DOS.  If you use Toddy's /BS
  1137.         switch, the setting for 4DOS must be /BS255.
  1138.  
  1139.         You may have some trouble using redirected input with programs
  1140.         like DEBUG and EDLIN when Toddy is installed.  If Toddy receives
  1141.  
  1142.  
  1143.  
  1144.         a redirected text file, Toddy will interpret both the carriage
  1145.         return and linefeed, which are at the end of every text line, as
  1146.         the ENTER key.  If effect, you'll get two ENTER's after every
  1147.         line.  To fix this problem, temporarily disable Toddy or use the
  1148.         /BS switch to limit when Toddy is active.  Redirected input is
  1149.         frequently used to assemble small programs using the DEBUG pro-
  1150.         gram.
  1151.  
  1152.         The memory allocated with the /HS and /MS switches is assigned to
  1153.         a common pool called the heap.  If you allocate memory to the
  1154.         command history but no memory to the macro table, you will still
  1155.         be able to define macros, though this will leave you with less
  1156.         than the allocated amount of history space.  The /A switch dis-
  1157.         plays the current memory allocations.  All available heap memory
  1158.         may be used for macros, and whatever memory is left over is used
  1159.         for the command history.  The third number displayed by the /A
  1160.         switch is the heap memory required by the file name completion
  1161.         commands (F9 and F10).  There must be at least that many bytes
  1162.         free to use these commands.  When the file name completion com-
  1163.         mands are used, the size of command history may adjusted downward
  1164.         by deleting the oldest entries.
  1165.  
  1166.         The DOS template commands (F1 to F4) use the most recent command
  1167.         line stored in the command history, so if you plan on using these
  1168.         keys, you should make sure that there is enough history space
  1169.         (i.e. enough free space) to hold at least one command line.
  1170.  
  1171.         Before Toddy is installed, all available memory is allocated to
  1172.         the memory pool.  If you run "TODDY /A" before installing Toddy,
  1173.         the total allocated memory will usually be larger than the sum of
  1174.         the first three numbers.  This number is the approximate number
  1175.         of maximum bytes available for the /B, /HS, /MS, and /MN switch-
  1176.         es.
  1177.  
  1178.         Each command of a chained command is displayed as it is executed.
  1179.         Only the final form of the command is displayed (that is, after
  1180.         all macros have been processed).  To see the see final form of
  1181.         the first command, precede the chained commands with the chain
  1182.         character.  For instance, if you defined the following macro:
  1183.  
  1184.           TODDY d=dir
  1185.  
  1186.         when you run the "d" macro, you will not see the DIR command,
  1187.         just the results of the DIR.  If you wish to see the actual DIR,
  1188.         define the macro as:
  1189.  
  1190.           TODDY d=$s$tdir
  1191.  
  1192.         You might have trouble using the DOS pipe and redirection com-
  1193.         mands with macros because the macro parameters $* and $n* will
  1194.         include such commands.  So if you define the following macro:
  1195.  
  1196.           TODDY d=dir $* /w
  1197.  
  1198.         if you run D and try to redirect the output "d > file" the macro
  1199.  
  1200.  
  1201.  
  1202.         will expand to "dir > file /w", which probably isn't what you
  1203.         want.  With most programs, you can solve this problem by specify-
  1204.         ing the command line switches first, so define the macro as:
  1205.  
  1206.           TODDY d=dir /w $*
  1207.  
  1208.         You can use the parameter character (the dollar sign by default)
  1209.         in macro names, but if you call that macro from another macro,
  1210.         you must use two parameter characters ($$).  You can also use the
  1211.         chain character in macro names, but you must put the macro name
  1212.         in (removable) quotes to call it.  Macro names cannot contain
  1213.         spaces or removable quotes.  If you use a quote before or within
  1214.         the first field of a line, the quotes only affect the first field
  1215.         (i.e. the command), not the arguments.
  1216.  
  1217.         If you have saved macros to TODDY.COM (using the /W switch), use
  1218.         the /MC switch to install Toddy without those macro definitions.
  1219.         It will be necessary use the /MC switch to install Toddy with a
  1220.         macro and history size of zero if you have saved macros in this
  1221.         manner.
  1222.